<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<%--
  Created by IntelliJ IDEA.
  User: 李洪均
  Date: 2023/4/26
  Time: 10:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<style>
    td{
        border: 1px solid black;
    }
    table{
        border-collapse: collapse;
    }
</style>
<body>
<input type="button" value="新增" onclick="window.open('BrandAdd.jsp')">
<hr>
<table>
    <thead>
    <td>序号</td>
    <td>品牌名称</td>
    <td>企业名称</td>
    <td>排序</td>
    <td>品牌介绍</td>
    <td>状态</td>
    <td>操作</td>
    </thead>
    <tbody>
<%--    step 步进 i++  i=i+2
      varStartus 状态
--%>
    <c:forEach items="${list}" var="model">
        <tr>
            <td>${model.id}</td>
            <td>${model.brandName}</td>
            <td>${model.enterpriseName}</td>
            <td>${model.sort}</td>
            <td>${model.introduce}</td>
<%--            <c:if test="${model.status==1}">--%>
<%--                <td>启用</td>--%>
<%--            </c:if>--%>
<%--            <c:if test="${model.status==0}">--%>
<%--                <td>禁用</td>--%>
<%--            </c:if>--%>
            <td>${model.status==1?"启用":"禁用"}</td>
            <td>
                <a href="/findById?id=${model.id}">修改</a>
                <a href="/delete?id=${model.id}">删除</a>
            </td>
        </tr>
    </c:forEach>

    </tbody>
</table>
</body>
</html>
